package cn.org.eshow.service;

import cn.org.eshow.bean.query.PromotionQuery;
import cn.org.eshow.common.page.Page;
import cn.org.eshow.model.Promotion;

import javax.jws.WebService;
import java.util.List;

@WebService
public interface PromotionManager extends GenericManager<Promotion, Integer> {

    List<Promotion> list(PromotionQuery query);

    Page<Promotion> search(PromotionQuery query);

    Promotion check(PromotionQuery query);

    /**
     * 保存优惠促销信息
     *
     * @param promotion
     * @param productIds       商品IDs
     * @param productDiscounts 商品折扣
     * @return
     */
//    Promotion save(Promotion promotion, String productIds, String productDiscounts);

    /**
     * 禁用促销方法
     *
     * @param promotion
     */
    void enabled(Promotion promotion);

    Promotion save(Promotion promotion);

    long count(PromotionQuery query);


}